package com.wc.alorithm_blue_bridge_history.littlewhite.Q231223.Q10005;

import java.util.Scanner;

/**
 * @Author congege
 * @Description
 * https://www.lanqiao.cn/problems/10005/learning/?contest_id=154
 * @Date Created in 2023/12/23-19:00
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc  = new Scanner(System.in);

        long n = sc.nextLong();

        System.out.println(n * (n + 1) * (2 * n + 1) / 6);
    }
}
